﻿Imports System.Windows.Forms

Public Class datepick
    Public ReportType As String
    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Shell(System.AppDomain.CurrentDomain.BaseDirectory & "ra.exe " & DateTimePicker1.Value & " " & DateTimePicker2.Value & " " & ReportType)
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub datepick_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        DateTimePicker1.Value = Now.AddDays(-1).Date
        DateTimePicker2.Value = Now.Date
    End Sub
End Class
